package com.idealighter.game.server.db.datadb.generate.mapper;

import com.idealighter.game.server.db.datadb.generate.domain.RoomCardNiuniuScoreDetailsDomain;
import com.idealighter.game.server.db.datadb.generate.domain.RoomCardNiuniuScoreDetailsDomainExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface RoomCardNiuniuScoreDetailsDomainMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_niuniu_score_details
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @SelectProvider(type=RoomCardNiuniuScoreDetailsDomainSqlProvider.class, method="countByExample")
    long countByExample(RoomCardNiuniuScoreDetailsDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_niuniu_score_details
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @DeleteProvider(type=RoomCardNiuniuScoreDetailsDomainSqlProvider.class, method="deleteByExample")
    int deleteByExample(RoomCardNiuniuScoreDetailsDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_niuniu_score_details
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @Delete({
        "delete from room_card_niuniu_score_details",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_niuniu_score_details
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @Insert({
        "insert into room_card_niuniu_score_details (room, player_id, ",
        "super_id, player_name, ",
        "avatar, round, bet, ",
        "score, total_score, ",
        "bet_other_chips, bet_other_player_id, ",
        "bet_other_player_name, call_banker_multiple, ",
        "card_type, card_values, ",
        "is_banker)",
        "values (#{room,jdbcType=BIGINT}, #{playerId,jdbcType=BIGINT}, ",
        "#{superId,jdbcType=BIGINT}, #{playerName,jdbcType=VARCHAR}, ",
        "#{avatar,jdbcType=VARCHAR}, #{round,jdbcType=INTEGER}, #{bet,jdbcType=BIGINT}, ",
        "#{score,jdbcType=BIGINT}, #{totalScore,jdbcType=BIGINT}, ",
        "#{betOtherChips,jdbcType=BIGINT}, #{betOtherPlayerId,jdbcType=BIGINT}, ",
        "#{betOtherPlayerName,jdbcType=VARCHAR}, #{callBankerMultiple,jdbcType=INTEGER}, ",
        "#{cardType,jdbcType=TINYINT}, #{cardValues,jdbcType=VARCHAR}, ",
        "#{isBanker,jdbcType=BIT})"
    })
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insert(RoomCardNiuniuScoreDetailsDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_niuniu_score_details
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @InsertProvider(type=RoomCardNiuniuScoreDetailsDomainSqlProvider.class, method="insertSelective")
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insertSelective(RoomCardNiuniuScoreDetailsDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_niuniu_score_details
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @SelectProvider(type=RoomCardNiuniuScoreDetailsDomainSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="room", property="room", jdbcType=JdbcType.BIGINT),
        @Result(column="player_id", property="playerId", jdbcType=JdbcType.BIGINT),
        @Result(column="super_id", property="superId", jdbcType=JdbcType.BIGINT),
        @Result(column="player_name", property="playerName", jdbcType=JdbcType.VARCHAR),
        @Result(column="avatar", property="avatar", jdbcType=JdbcType.VARCHAR),
        @Result(column="round", property="round", jdbcType=JdbcType.INTEGER),
        @Result(column="bet", property="bet", jdbcType=JdbcType.BIGINT),
        @Result(column="score", property="score", jdbcType=JdbcType.BIGINT),
        @Result(column="total_score", property="totalScore", jdbcType=JdbcType.BIGINT),
        @Result(column="bet_other_chips", property="betOtherChips", jdbcType=JdbcType.BIGINT),
        @Result(column="bet_other_player_id", property="betOtherPlayerId", jdbcType=JdbcType.BIGINT),
        @Result(column="bet_other_player_name", property="betOtherPlayerName", jdbcType=JdbcType.VARCHAR),
        @Result(column="call_banker_multiple", property="callBankerMultiple", jdbcType=JdbcType.INTEGER),
        @Result(column="card_type", property="cardType", jdbcType=JdbcType.TINYINT),
        @Result(column="card_values", property="cardValues", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_banker", property="isBanker", jdbcType=JdbcType.BIT)
    })
    List<RoomCardNiuniuScoreDetailsDomain> selectByExample(RoomCardNiuniuScoreDetailsDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_niuniu_score_details
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @Select({
        "select",
        "id, room, player_id, super_id, player_name, avatar, round, bet, score, total_score, ",
        "bet_other_chips, bet_other_player_id, bet_other_player_name, call_banker_multiple, ",
        "card_type, card_values, is_banker",
        "from room_card_niuniu_score_details",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="room", property="room", jdbcType=JdbcType.BIGINT),
        @Result(column="player_id", property="playerId", jdbcType=JdbcType.BIGINT),
        @Result(column="super_id", property="superId", jdbcType=JdbcType.BIGINT),
        @Result(column="player_name", property="playerName", jdbcType=JdbcType.VARCHAR),
        @Result(column="avatar", property="avatar", jdbcType=JdbcType.VARCHAR),
        @Result(column="round", property="round", jdbcType=JdbcType.INTEGER),
        @Result(column="bet", property="bet", jdbcType=JdbcType.BIGINT),
        @Result(column="score", property="score", jdbcType=JdbcType.BIGINT),
        @Result(column="total_score", property="totalScore", jdbcType=JdbcType.BIGINT),
        @Result(column="bet_other_chips", property="betOtherChips", jdbcType=JdbcType.BIGINT),
        @Result(column="bet_other_player_id", property="betOtherPlayerId", jdbcType=JdbcType.BIGINT),
        @Result(column="bet_other_player_name", property="betOtherPlayerName", jdbcType=JdbcType.VARCHAR),
        @Result(column="call_banker_multiple", property="callBankerMultiple", jdbcType=JdbcType.INTEGER),
        @Result(column="card_type", property="cardType", jdbcType=JdbcType.TINYINT),
        @Result(column="card_values", property="cardValues", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_banker", property="isBanker", jdbcType=JdbcType.BIT)
    })
    RoomCardNiuniuScoreDetailsDomain selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_niuniu_score_details
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @UpdateProvider(type=RoomCardNiuniuScoreDetailsDomainSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") RoomCardNiuniuScoreDetailsDomain record, @Param("example") RoomCardNiuniuScoreDetailsDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_niuniu_score_details
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @UpdateProvider(type=RoomCardNiuniuScoreDetailsDomainSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") RoomCardNiuniuScoreDetailsDomain record, @Param("example") RoomCardNiuniuScoreDetailsDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_niuniu_score_details
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @UpdateProvider(type=RoomCardNiuniuScoreDetailsDomainSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(RoomCardNiuniuScoreDetailsDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_niuniu_score_details
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @Update({
        "update room_card_niuniu_score_details",
        "set room = #{room,jdbcType=BIGINT},",
          "player_id = #{playerId,jdbcType=BIGINT},",
          "super_id = #{superId,jdbcType=BIGINT},",
          "player_name = #{playerName,jdbcType=VARCHAR},",
          "avatar = #{avatar,jdbcType=VARCHAR},",
          "round = #{round,jdbcType=INTEGER},",
          "bet = #{bet,jdbcType=BIGINT},",
          "score = #{score,jdbcType=BIGINT},",
          "total_score = #{totalScore,jdbcType=BIGINT},",
          "bet_other_chips = #{betOtherChips,jdbcType=BIGINT},",
          "bet_other_player_id = #{betOtherPlayerId,jdbcType=BIGINT},",
          "bet_other_player_name = #{betOtherPlayerName,jdbcType=VARCHAR},",
          "call_banker_multiple = #{callBankerMultiple,jdbcType=INTEGER},",
          "card_type = #{cardType,jdbcType=TINYINT},",
          "card_values = #{cardValues,jdbcType=VARCHAR},",
          "is_banker = #{isBanker,jdbcType=BIT}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(RoomCardNiuniuScoreDetailsDomain record);
}